<template>
  <div>
    登录
    <div>
      用户名  <input v-model="username" />
    </div>
    <button @click="submit">登录</button>
  </div>
</template>

<script>
export default {
  data(){
    return  {
      username:""
    }
  },
  methods:{
    submit(){
      //alert(this.username);
      window.localStorage.setItem("loginName",this.username);
    }
  }

}
</script>

<style>

</style>